####################################################
{{ pillar['global'] }}
####################################################
{{ pillar['defaults'] }}
####################################################
{{ pillar['frontend'] }}
####################################################
{% if grains['node'] == 'NJ-5' %}
{{ pillar['CMN-NJ-5']['diy'] }}
####################################################
{{ pillar['backendinfo'] }}
{{ pillar['CMN-NJ-5']['httpcheck'] }}
{{ pillar['CMN-NJ-5']['backend'] }}
{% elif grains['node'] == 'NJ-H' %}
{{ pillar['CMN-NJ-H']['diy'] }}
####################################################
{{ pillar['backendinfo'] }}
{{ pillar['CMN-NJ-H']['httpcheck'] }}
{{ pillar['CMN-NJ-H']['backend'] }}

{% elif grains['node'] == 'NJ-L' %}
{{ pillar['CMN-NJ-L']['diy'] }}
####################################################
{{ pillar['backendinfo'] }}
{{ pillar['CMN-NJ-L']['httpcheck'] }}
{{ pillar['CMN-NJ-L']['backend'] }}

{% elif grains['node'] == 'NJ-Q' %}
{{ pillar['CMN-NJ-Q']['diy'] }}
####################################################
{{ pillar['backendinfo'] }}
{{ pillar['CMN-NJ-Q']['httpcheck'] }}
{{ pillar['CMN-NJ-Q']['backend'] }}

{% elif grains['node'] == 'NJ-M' %}
{{ pillar['aclinfo'] }}
####################################################
acl black_ip hdr_end(host) -i -f /usr/local/haproxy/etc/shencan.conf
use_backend black_ip_cmn if black_ip
 use_backend fc_backend if TRUE
 default_backend fc_backend
{{ pillar['blackbackend'] }}
 backend fc_backend
 mode http
 fullconn 60000
 option allbackups
 balance urh
{{ pillar['CMN-NJ-M']['httpcheck'] }}
{{ pillar['CMN-NJ-M']['backend'] }}

{% elif grains['node'] == 'NJ-K' %}
{{ pillar['CMN-NJ-K']['diy'] }}
####################################################
{{ pillar['backendinfo'] }}
{{ pillar['CMN-NJ-K']['httpcheck'] }}
{{ pillar['CMN-NJ-K']['backend'] }}

{% elif grains['node'] == 'NJ-R' %}
{{ pillar['CMN-NJ-R']['diy'] }}
####################################################
{{ pillar['backendinfo'] }}
{{ pillar['CMN-NJ-R']['httpcheck'] }}
{{ pillar['CMN-NJ-R']['backend'] }}

{% elif grains['node'] == 'NJ-S' %}
{{ pillar['CMN-NJ-S']['diy'] }}
####################################################
{{ pillar['backendinfo'] }}
{{ pillar['CMN-NJ-S']['httpcheck'] }}
{{ pillar['CMN-NJ-S']['backend'] }}

{% elif grains['node'] == 'NJ-6' %}
{{ pillar['CMN-NJ-6']['diy'] }}
####################################################
{{ pillar['backendinfo'] }}
{{ pillar['CMN-NJ-6']['httpcheck'] }}
{{ pillar['CMN-NJ-6']['backend'] }}

{% elif grains['node'] == 'NJ-4' %}
{{ pillar['CMN-NJ-4']['diy'] }}
####################################################
{{ pillar['backendinfo'] }}
{{ pillar['CMN-NJ-4']['httpcheck'] }}
{{ pillar['CMN-NJ-4']['backend'] }}
{% else %}

{% endif %}
